package com.marvels.product.param.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.marvels.product.param.dto.McptCustomerTypeParamDTO;
import com.marvels.product.param.service.McptCustomerTypeParamApi;

/**
 * 认定客户类型参数
 * @author tangpw
 *
 */
@RestController
@RequestMapping("/product/param/customerType/service")
public class CustomerTypeParamController {
	

	@Autowired
	private McptCustomerTypeParamApi typeParamApi;
	
	/**
	 * 根据客户类型id查询认定客户类型参数
	 * @param typeParamDTO
	 * @return
	 */
	@RequestMapping("/selectTypeById")
	@ResponseBody
	public McptCustomerTypeParamDTO selectTypeById(@RequestBody McptCustomerTypeParamDTO typeParamDTO){
		McptCustomerTypeParamDTO dto=typeParamApi.selectTypeById(typeParamDTO.getCustomerType());
		return dto;
	};
	
	
	
	/**
	 * 查询所有认定客户类型参数
	 * @return
	 */
	@RequestMapping("/selectAllType")
	@ResponseBody
	public List<McptCustomerTypeParamDTO> selectAllType(){
		List<McptCustomerTypeParamDTO> list=typeParamApi.selectAllType();
		return list;
	}; 
}
